package com.squid.cloud.common.enums;

import lombok.Getter;

@Getter
public enum OilNoEnum {
    _92("92#", "92#汽油", false),
    _95("95#", "95#汽油", false),
    _98("98#", "98#汽油", false),
    U98("U98#", "U98#汽油", false),
    U95("U95#", "U95#汽油", false),
    _0("0#", "柴油", false),
    WX("WX","微信账户",false),
    PO("PO","购油账户",true),
    YYZH("非","非油品账户",false);

    private String code;
    private String displayName;
    private boolean visible;

    private OilNoEnum(String code, String displayName, boolean visible) {
        this.code = code;
        this.displayName = displayName;
        this.visible = visible;
    }

    public static OilNoEnum code2OilNo(String code) {
        for (OilNoEnum o : OilNoEnum.values()) {
            if (o.getCode().equals(code)) {
                return o;
            }
        }
        return null;
    }
}
